<td>
    <div class="form-group text-center">
	    <div class="checkbox">
            <input <% if(user.attributes.role_id == 1){%>disabled<%}%> id="<%- user.attributes.id%>"  name="user_id[<%- user.attributes.id %>]" value="<%- user.attributes.id%>" class="js-checkbox-list <%if(parseInt(user.attributes.is_active) === 1){%>js-checkbox-active<%}else{%>js-checkbox-inactive<%}%><% if(!user.attributes.is_email_confirmed){ %> js-checkbox-unconfirmed<%}%>" type="checkbox">
            <label class="js-update-user" data-user_id="<%- user.attributes.id %>" for="<%- user.attributes.id%>"></label>
        </div>
    </div>
</td>
<td>
<div class="user-table-width">
	<div class="row">
		<div class="col-xs-12">
			<div class="clearfix"> 
				<a  title="<%- user.attributes.full_name%> (<%- user.attributes.username%>)" class="small-user pull-left show" href="#/user/<%- user.attributes.id%>">
					<% if(!_.isEmpty(user.attributes.profile_picture_path)){ 
						var profile_picture_path = user.showImage('User', user.attributes.id, 'small_thumb' );
					%>
						<img class="avatar-sm" src="<%- profile_picture_path%>" alt="[Images: <%- user.attributes.username%>]" title="<%- user.attributes.full_name %> (<%- user.attributes.username%>)" />
						<% }else{ %>
								<i class="avatar avatar-color-194 img-rounded avatar-sm" title="<%- user.attributes.full_name%> (<%- user.attributes.username%>)"><%- user.attributes.initials%></i>
						<%  } %> 
				</a>
			<a class="col-xs-10 htruncate left-mar-sm js-board-name-truncate" href="#/user/<%- user.attributes.id%>"><%- user.attributes.full_name%></a><a><% if(!user.attributes.is_email_confirmed){ %>
						<span class="label label-warning navbar-right"><%- i18next.t('Unconfirmed') %></span>
					<% } %> 
				<% if(user.attributes.is_ldap){ %>
						<span class="label label-success navbar-right">LDAP</span>
					<% } %>
					</a>
					
			</div>
			<div class="clearfix navbar-btn">
				<span class="col-xs-12 htruncate nav"><%- user.attributes.email%></span>
			</div>
		</div>
	</div>
	</div>
</td> 
<td class="text-center">
	<div class="btn-group text-left navbar-btn dropdown">
	    <%- user.attributes.created_organization_count %>
    </div>
</td>
<td class="text-center">
    <div class="btn-group text-left navbar-btn dropdown">
	    <%- user.attributes.owner_organization_count%>
    </div>
</td>
<td class="text-center">
    <div class="btn-group text-left navbar-btn dropdown">
		<%- user.attributes.member_organization_count%>
    </div>
</td>
<td class="text-center"> 
   <div class="btn-group text-left navbar-btn dropdown">
		<%- user.attributes.created_board_count%>
	</div>
</td>
<td class="text-center">
    <div class="btn-group text-left navbar-btn dropdown">
		<%- user.attributes.owner_board_count%>
	</div>
</td>
<td class="text-center">
    <div class="btn-group text-left navbar-btn dropdown">
		<%- user.attributes.member_board_count%>
	</div>
</td>
<td class="text-center">
    <span class="navbar-btn"><%- user.attributes.user_login_count%></span>
</td>
<td class="text-center">
    <% if(user.get('last_login_date') !== null){ %><abbr class="timeago" title="<%- user.get('last_login_date') %>"><%- user.get("last_login_date") %></abbr><%}else{%>-<%}%>
	
</td>
<td class="text-center">
	<span class="show"><%- user.attributes.last_login_ip%></span> 
		<% if(!_.isEmpty(user.attributes.login_country_iso2)){ %>
			<span class="flags flag-<%- user.attributes.login_country_iso2%> top-smspace" title="<%- user.attributes.login_country_name %>"><%- user.attributes.login_country_name %></span>
		<% } %>
	<% if(!_.isEmpty(user.attributes.login_city_name)){ %> <%- user.attributes.login_city_name %><% } %>
</td>
<td class="text-center">
    <abbr class="timeago" title="<%- user.get('created') %>"><%- user.get("created") %></abbr>
</td> 
<td class="text-center">
	<span class="show"><%- user.attributes.registered_ip%></span> 
		<% if(!_.isEmpty(user.attributes.register_country_iso2)){ %>
			<span class="flags flag-<%- user.attributes.register_country_iso2%> top-smspace" title="<%- user.attributes.register_country_name %>"><%- user.attributes.register_country_name %></span>
		<% } %>
	<% if(!_.isEmpty(user.attributes.register_city_name)){ %> <span><%- user.attributes.register_city_name %></span><% } %>
</td>
<td class="text-center devices-td devices-td-new">
	<div class="dropdown btn-group">  
	<% _.each(user.roles, function(role){%>
		<%if(user.attributes.role_id == role.id){%>  
			<button class="btn btn-default btn-xs" type="button"><%- role.name%></button>
		<%}%>
	<%})%>
		<button aria-expanded="false" data-toggle="dropdown" class="btn btn-default btn-xs dropdown-toggle" type="button">
		    <span class="caret"></span><span class="sr-only"><%- i18next.t("Toggle Dropdown") %></span>
        </button>
		<ul class="dropdown-menu arrow arrow-right js-admin-list-user-role" role="menu">
			<% _.each(user.roles, function(role){%>
				<li class="text-left"><a href="#" class="<% if(user.attributes.role_id == role.id){%>js-no-action<%}else{%>js-change-user-role<%}%>" data-role-id="<%- role.id %>"><%- role.name%> <% if(user.attributes.role_id == role.id){%><i class="icon-ok"></i><%}%></a></li>
			<%})%>
		</ul>
	</div>
</td>


<td>
   <ul class="list-inline list-group-item-text">
	   	<li class="navbar-btn"><a href="#" title="<%- i18next.t('Activities') %>" class="btn btn-default btn-xs js-all-user-activities"><%- i18next.t("Activities") %></a></li>
	   	
		<li class="navbar-btn">
			<a href="#" class="btn btn-default btn-xs <%if(parseInt(user.attributes.is_active) === 1){%>js-block-user<%}else{%>js-unblock-user<%}%>"  title="<%- i18next.t('Block') %>" <% if(user.attributes.role_id == 1){%> disabled="disabled" <% } %>>
			<i class="icon-exclamation"></i>
			<span><%if(parseInt(user.attributes.is_active) === 1){%><%- i18next.t("Block") %><%}else{%><%- i18next.t("Unblock") %><%}%></span></a>
		</li>  
		<li class="navbar-btn">
			<div class="dropdown btn-group">  
					<button aria-expanded="false" data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button">
						<%- i18next.t("Change Password") %>
					</button>
							<ul class="dropdown-menu arrow arrow-right" role="menu">
										<div class="panel-body well-lg">
											<form role="form" class = "js-admin-change-password" name="UserChangePasswordAdminForm" id="UserChangePasswordAdminForm">
													<div class="form-group input password required">
														<label class="sr-only control-label" for="inputPassword"><%- i18next.t('Enter a new Password') %></label>
														<input type="password" class="form-control" placeholder="<%- i18next.t('Enter a new Password') %>" id="inputPassword" name="password" required title="<%- i18next.t('Enter a new Password') %>">
													</div>
													<div class="form-group input cpassword required">
														<label class="sr-only control-label" for="inputConfirmPassword"><%- i18next.t('Confirm Password') %></label>
														<input type="password" class="form-control" placeholder="<%- i18next.t('Confirm Password') %>" id="inputConfirmPassword" name="confirm_password" required title="<%- i18next.t('Confirm Password') %>">
													</div>
													<div class="form-group">
														<label class="sr-only control-label" for="submit2"><%- i18next.t('Change Password') %></label>
														<input type="submit" class="btn btn-primary col-xs-12" id="submitChangePasswordAdmin" value="<%- i18next.t('Change Password') %>" >
													</div>
											</form>
									</div>
							</ul>
				</div>
		</li> 
		<li class="navbar-btn">
			<span class="dropdown navbar-btn">
			<a aria-expanded="false" data-toggle="dropdown" class="btn btn-primary btn-xs" href="#" <% if(user.attributes.role_id == 1){%> disabled="disabled" <% } %> >
				<i class="icon-remove"></i> <%- i18next.t("Delete") %>
			</a>
			<ul class="dropdown-menu dropdown-menu-right arrow arrow-right col-xs-12">
				<li class="col-lg-12 clearfix text-center"> <div><span class="col-xs-10"><strong><%- i18next.t("Delete User") + '?' %></strong></span><a class="js-close-popover pull-right" href="#/users"><i class="icon-remove "></i></a></div> </li>
				<li class="col-lg-12 divider"></li>
				<li class="col-lg-12 text-left">
					<span class="show"><%- i18next.t("Deleting an user is permanent. There is no undo.") %></span>
						<div class="col-xs-12 btn-block navbar-btn"><a title="<%- i18next.t('Delete User') %>" class="js-remove-user"><span class="btn btn-primary"><%- i18next.t("Delete") %></span></a></div>
				</li>
			</ul>
		</li>
    </ul>
</td>